//
//  UIView+Layer.h
//  APP
//
//  Created by huanchi on 15/12/22.
//  Copyright © 2015年 上海欢炽网络科技有限公司. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIView (corner)
/**
 *  设置layer(圆角)
 *
 *  @param radius <#radius description#>
 */
-(void)layerWithRadius:(CGFloat)radius;
/**
 *  设置layer (圆角 描边 线宽)
 *
 *  @param radius <#radius description#>
 *  @param color  <#color description#>
 *  @param width  <#width description#>
 */
-(void)layerWithRadius:(CGFloat)radius borderColor:(UIColor *)color borderWidth:(CGFloat)width;
/**
 *  为view添加线 (起点 终点 线颜色 线宽)
 *
 *  @param start     <#start description#>
 *  @param end       <#end description#>
 *  @param lineColor <#lineColor description#>
 *  @param height    <#height description#>
 */
-(void)addLineLayerFromPoint:(CGPoint)start toPoint:(CGPoint)end withLineColor:(UIColor *)lineColor andLineHeight:(CGFloat)height;

/**
 * 切指定大小圆角

 @param cornerRadius <#cornerRadius description#>
 */
-(void)cutLayerCornerRadius:(CGFloat)cornerRadius;
@end

typedef  void(^completion)();

@interface UIView (animation)

@property (nonatomic, copy) completion completionHandle;

/**
 *  翻页动画
 *
 *  @param transition       翻页方式
 *  @param delay            <#delay description#>
 *  @param duration         <#duration description#>
 *  @param completionHandle <#completionHandle description#>
 */
-(void)curlAnimationTransition:(UIViewAnimationTransition)transition  delay:(double)delay  duration:(double)duration completion:(completion)completionHandle;

/**
 *  缩放动画
 *
 *  @param scaleValue       <#scaleValue description#>
 *  @param delay            <#delay description#>
 *  @param duration         <#duration description#>
 *  @param completionHandle <#completionHandle description#>
 */
-(void)scaleAnimationWithValue:(double)scaleValue delay:(double)delay duration:(double)duration completion:(completion)completionHandle;

-(void )animationWithType:(NSString *)type subType:(NSString *)subType duration:(float)duration;
@end
